cmake_minimum_required(VERSION 3.26)
project(YangtzeRiver)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(Boost_DIR "C:/install/Boost/lib/cmake/Boost-1.88.0")
find_package(Boost REQUIRED COMPONENTS date_time beast json CONFIG REQUIRED)

# 查找 fmt 库
set(fmt_DIR "C:/install/FMT/lib/cmake/fmt")
find_package(fmt REQUIRED)

add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

add_executable(YangtzeRiver
        main.cpp
)

target_link_libraries(YangtzeRiver ${Boost_LIBRARIES}
        $<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:pthread>
        fmt::fmt
)